package com.fametal.ui.activity;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import com.fametal.GlobalConstant.Settings;
import com.fametal.R;
import com.fametal.ui.utils.Utils;

public class VideoControlActivity extends Activity {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.video_meeting);
	}

	public void onClick(View view) {
		String operation = null;
		switch (view.getId()) {
		case R.id.video_call:
			operation = "call";
			break;
		case R.id.video_hangup:
			operation = "hangup";
			break;
		case R.id.video_home:
			operation = "home";
			break;
		case R.id.video_back:
			operation = "back";
			break;
		case R.id.video_volume_increase:
			operation = "volumeincrease";
			break;
		case R.id.video_volume_decrease:
			operation = "volumedecrease";
			break;
		case R.id.video_camera:
			operation = "camera";
			break;
		case R.id.video_auto:
			operation = "auto";
			break;
		case R.id.video_display:
			operation = "display";
			break;
		case R.id.video_content:
			operation = "content";
			break;
		case R.id.video_microphone:
			operation = "microphone";
			break;
		case R.id.video_delete:
			operation = "delete";
			break;
		case R.id.video_one:
			operation = "1";
			break;
		case R.id.video_two:
			operation = "2";
			break;
		case R.id.video_three:
			operation = "3";
			break;
		case R.id.video_four:
			operation = "4";
			break;
		case R.id.video_five:
			operation = "5";
			break;
		case R.id.video_six:
			operation = "6";
			break;
		case R.id.video_seven:
			operation = "7";
			break;
		case R.id.video_eight:
			operation = "8";
			break;
		case R.id.video_nine:
			operation = "9";
			break;
		case R.id.video_asterisk:
			operation = "asterisk";
			break;
		case R.id.video_zero:
			operation = "0";
			break;	
			
		case R.id.video_wellnumber:
			operation = "wellnumber";
			break;
		case R.id.video_up:
			operation = "up";
			break;
		case R.id.video_left:
			operation = "left";
			break;
		case R.id.video_ok:
			operation = "ok";
			break;
		case R.id.video_right:
			operation = "right";
			break;
		case R.id.video_dot:
			operation = "dot";
			break;
		case R.id.video_down:
			operation = "down";
			break;
		}
		if(operation != null && !operation.equals("")){
			String url = Settings.IP + "cgi-bin/hardisk_VCR.cgi?operation=" + operation;
			get(url);
		}
	}
	
	public void get(String url) {
		Utils.get(getParent(), url, false);
	}
	
}
